<!DOCTYPE html>
<html>
<head>
    <title>erp提示消息</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("message:message:save")>
            <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("message:message:update")>
            <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("message:message:delete")>
            <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
            <a class="btn btn-primary btn-sm" @click="markupSelectRead"><i class="glyphicon glyphicon-tag"></i>&nbsp;标记已读</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal" style="width: 650px">
        <div class="form-group">
            <div class="col-sm-2 control-label">消息标题</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="message.title" placeholder="标题"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">消息类型</div>
            <div class="col-sm-10">
                <el-select v-model="message.messageType"  placeholder="请选择" size="small" style="width: 100%">
                    <el-option
                            v-for="item in messageTypeEnum"
                            :key="item.value"
                            :label="item.describe"
                            :value="item.value">
                    </el-option>
                </el-select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">消息内容</div>
            <div class="col-sm-10">
                <textarea class="form-control" rows="3" v-model="message.content" placeholder="消息内容"></textarea>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 control-label">消息方式</div>
            <div class="col-sm-10">
                <el-select v-model="message.launchShape"  placeholder="请选择" size="small" style="width: 100%">
                    <el-option
                            v-for="item in launchShapeEnum"
                            :key="item.value"
                            :label="item.describe"
                            :value="item.value">
                    </el-option>
                </el-select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">投放渠道</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="message.launchChannel" placeholder="投放渠道"/>
            </div>
        </div>
     <!--   <div class="form-group">
            <div class="col-sm-2 control-label">删除</div>
            <div class="col-sm-10">
                <el-switch
                        v-model="message.delFlag"
                        active-text="是"
                        inactive-text="否">
                </el-switch>
            </div>
        </div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label">投放时间</div>
            <div class="col-sm-10">
                    <el-date-picker
                            v-model="message.displayDate"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            type="datetime"
                            size="small"
                            placeholder="选择日期时间"
                            align="right">
                    </el-date-picker>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="保存"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/message/message.js?_${.now?long}"></script>
</body>
</html>